package com.example.javamediaserver.controller;

import com.example.javamediaserver.config.MediaServerConfig;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
@RequiredArgsConstructor
public class WebController {

    private final MediaServerConfig config;
    
    @GetMapping("/")
    public String index(Model model) {
        model.addAttribute("rtmpPort", config.getRtmp().getPort());
        model.addAttribute("httpPort", config.getHttp().getPort());
        return "index";
    }
} 